import { get, post, del, put } from '../../../utils/request';

export function getKpi() {
  return get('v1/user/kpi');
}
export function getTasks(params) {
  return get('v1/tasks', params);
}
export function getTask(id) {
  return get(`v1/tasks/${id}`);
}
export function removeTask(id) {
  return del(`v1/tasks/${id}`);
}
export function createTask(params) {
  return post('v1/tasks', params);
}
export function updateTask(id, params) {
  return put(`v1/tasks/${id}`, params);
}
export function doneTask(id) {
  return put(`v1/tasks/${id}/set-done`);
}
export function cancelTask(id) {
  return put(`v1/tasks/${id}/cancel`);
}
